/*
 * @Author: hmhvictory 1400628624@qq.com
 * @Date: 2025-08-01 16:04:34
 * @LastEditors: hmhvictory 1400628624@qq.com
 * @LastEditTime: 2025-08-01 16:04:44
 * @FilePath: \Gitee实训笔记\day15\Homework\test01\test02\Salesman.java
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
package day15.test02;

// 销售人员类
class Salesman extends Employee {
    private double baseSalary;
    private double commission;

    public Salesman(String name, String gender, String birthDate, double baseSalary, double commission) {
        super(name, gender, birthDate);
        this.baseSalary = baseSalary;
        this.commission = commission;
    }

    @Override
    public void computeSalary() {
        double salary = baseSalary + commission;
        System.out.println("销售员 " + getName() + " 本月工资为 " + salary + " 元。");
    }
}
